/**
 * why did you render
 * vite 生效, webpack 不生效, 不过无所谓, 反正也不在 webpack 下做开发
 * https://github.com/welldone-software/why-did-you-render
 * https://medium.com/welldone-software/why-did-you-render-mr-big-pure-react-component-2a36dd86996f
 * https://medium.com/welldone-software/why-did-you-render-mr-big-pure-react-component-part-2-common-fixing-scenarios-667bfdec2e0f
 *
 * */
// import "@/wdyr"; // <--- first import
/**
 * import 'core-js/stable';
 * import 'regenerator-runtime/runtime';
 * 等价于 ☞ import 'react-app-polyfill/stable';
 * CRA 官方不常升级 core-js，因此，自行引入 core-js，效果一致。
 * 如果不需要考虑兼容性，可删除。
 */
// import 'core-js/stable';
// import 'regenerator-runtime/runtime';

import '@/vendor/$dayjs';

import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN';
import ReactDOM from 'react-dom';

import { GlobalStyles } from '@/styles';

import App from './App';
import reportWebVitals from './reportWebVitals';

ReactDOM.render(
  <div>
    <ConfigProvider locale={zhCN}>
      <GlobalStyles />
      <App />
    </ConfigProvider>
  </div>,
  document.getElementById('root'),
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
